<template>
  <div class="container">
    <img :src="data.imgUrl" class="ad-img" alt />
  </div>
</template>

<script lang="ts">
import Vue from 'vue'

export default Vue.extend({
  async asyncData(ctx) {
    const redisKey = ctx.query.rediskey
    let res = await ctx.app.$redis.asyncGet(redisKey)
    res = JSON.parse(res)
    let data = res.data 
    return {
      data
    }
  }
})
</script>

<style scoped>
.container {
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.ad-img {
  width: 598px;
  height: 190px;
  box-shadow: 0 0 2px 5px #666;
}
</style>
